﻿<%@ Page Title="" Language="C#" MasterPageFile="~/iFrameMasterPage.master" AutoEventWireup="true" CodeFile="iFrameAdmin_EditDiscount.aspx.cs" Inherits="iFrameAdmin_EditDiscount" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
<table style="width: 100%;">
    <tr>
        <td style ="width:25%;text-align :left" >
        <asp:UpdatePanel ID="updStatus" runat ="server" UpdateMode="Conditional"  >
        <ContentTemplate >
         <asp:Label ID=lblClientStatus  CssClass ="<%# GetStateVisible() %>" runat="server" 
        Text="Есть несохраненные данные" Font-Bold="True" Font-Size="XX-Small" 
        ForeColor="#FF5050"></asp:Label>
        </ContentTemplate>
        </asp:UpdatePanel>
        </td >
        <td "width:25%;text-align :left" >
        </td>        
        <td style ="text-align :right ">
            
        </td>
        <td style ="text-align :right;	width="160px">
        <asp:Button ID=Button1 runat="server" Text="К списку"   CssClass ="btn"  
                Height="22px" />        
        </td>
        
    </tr>
    
</table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" Runat="Server">
<asp:UpdatePanel ID="updCommonInfo" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div class="TblCaption" 
                onclick="CaptionToggle('body_CommonInfo','Caption_CommonInfo');" 
                style="width:100%; height :25px">
                <table style="width:100%;">
                    <tr>
                        <td ID="Caption_CommonInfo" class="ArrowDown">
                            &nbsp;</td>
                        <td>
                            Общая информация &nbsp;                            
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
            </div>
            <div ID="body_CommonInfo" style="width:100%">
                <table cellpadding="0" cellspacing="0" style="width:100%;">
                    <tr ID="trCommonInfo">
                        <td width="25%">
                            <table cellpadding="2" cellspacing="0" style="width:100%;">
                                <%--GID--%>
                                <tr>
                                    <td width="25%">
                                        &nbsp;</td>
                                    <td class="grd_td_item_caption" style="width:25%">
                                        Наименование:
                                        <asp:RequiredFieldValidator ID="txtNameValidator1" runat="server" 
                                            ControlToValidate="txtName" ErrorMessage="*"></asp:RequiredFieldValidator>
                                    </td>
                                    <td class="grd_td_item">
                                        <asp:TextBox ID="txtName" runat="server" CssClass="TextBox" Text =<%# Discount.Name %>
                                            Width="99%"></asp:TextBox>
                                    </td>
                                </tr>                                
                                <tr>
                                    <td width="25%">
                                        &nbsp;</td>
                                    <td class="grd_td_item_caption" style="width:25%">
                                        Тип:</td>
                                    <td class="grd_td_item">
                                        <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
                                            RepeatDirection="Horizontal">
                                            <asp:ListItem Selected="True">Скидка</asp:ListItem>
                                            <asp:ListItem>Начисление</asp:ListItem>
                                        </asp:RadioButtonList>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="25%">
                                        &nbsp;</td>
                                    <td class="grd_td_item_caption" style="width:25%">
                                        Сроки:</td>
                                    <td class="grd_td_item">
                                        <table cellpadding="2px" cellspacing="0" style="width:100%;" width="100%">
                                            <tr>
                                                <td style="width :75px">
                                                    Начало:</td>
                                                <td style="width:90px">
                                                    <asp:TextBox ID="txt_dtStart" runat="server" CssClass="datepicker" 
                                                     Text =<%#  Discount.dtStart.ToShortDateString() %>   ></asp:TextBox>
                                                </td>
                                                <td style="text-align:right">
                                                    Окончание:</td>
                                                <td style="width:90px">
                                                    <asp:TextBox ID="txt_dtFinish" runat="server" CssClass="datepicker" 
                                                       Text=<%# Discount.dtFinish.ToShortDateString()%>  ></asp:TextBox>
                                                </td>
                                                <td style="width:1px">
                                                    &nbsp;</td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="25%">
                                        &nbsp;</td>
                                    <td class="grd_td_item_caption" style="width:25%">
                                        Величина %:<asp:RegularExpressionValidator ID="RegularExpressionValidator2" 
                                            runat="server" ControlToValidate="txtPercent" ErrorMessage="*" 
                                            ValidationExpression="([0-9]{1,3})"></asp:RegularExpressionValidator>
                                    </td>
                                    <td class="grd_td_item">
                                        <asp:TextBox ID="txtPercent" runat="server" CssClass="TextBox" 
                                            Text="<%# Discount.Percent %>" Width="99%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="vertical-align :top " width="25%">
                                    </td>
                                    <td class="grd_td_item_caption" style="width:25%;vertical-align :top">
                                        Дополнительно:</td>
                                    <td class="grd_td_item">
                                        <asp:TextBox ID="txtComment" runat="server" CssClass="TextBox" Height="47px" 
                                             Text =<%# Discount.Description %> TextMode="MultiLine" Width="99%"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="25%">
                                        &nbsp;</td>
                                    <td style="width:25%">
                                        &nbsp;</td>
                                    <td style="text-align :right ">
                                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                            <ContentTemplate>
                                                <asp:Button ID="btnSaveCommonInfo" runat="server" CssClass="btn_wizard" 
                                                     Text="Сохранить" onclick="btnSaveCommonInfo_Click" />
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    
</asp:Content>

